package Model
{
	[Bindable]
	public class ClimateZone
	{
		private var _label:String;
		private var _countryId:Number;
		private var _gt:Number;
		private var _ht:Number;
		private var _globalNorth:Number;
		private var _globalSouth:Number;
		private var _globalEast:Number;
		private var _globalWest:Number;
		private var _globalHorizontal:Number;
		
		public function ClimateZone()
		{
			this.label = "Please Choose";
			this._countryId = 0;
			this._gt = 0;
			this._ht = 0;
			this._globalEast = 0;
			this._globalNorth = 0;
			this._globalSouth = 0;
			this._globalWest = 0;
			this._globalHorizontal = 0;
		}

		public function get label():String
		{
			return _label;
		}

		public function set label(value:String):void
		{
			_label = value;
		}

		public function get gt():Number
		{
			return _gt;
		}

		public function set gt(value:Number):void
		{
			_gt = value;
		}

		public function get ht():Number
		{
			return _ht;
		}

		public function set ht(value:Number):void
		{
			_ht = value;
		}

		public function get globalNorth():Number
		{
			return _globalNorth;
		}

		public function set globalNorth(value:Number):void
		{
			_globalNorth = value;
		}

		public function get globalSouth():Number
		{
			return _globalSouth;
		}

		public function set globalSouth(value:Number):void
		{
			_globalSouth = value;
		}

		public function get globalEast():Number
		{
			return _globalEast;
		}

		public function set globalEast(value:Number):void
		{
			_globalEast = value;
		}

		public function get globalWest():Number
		{
			return _globalWest;
		}

		public function set globalWest(value:Number):void
		{
			_globalWest = value;
		}

		public function get countryId():Number
		{
			return _countryId;
		}

		public function set countryId(value:Number):void
		{
			_countryId = value;
		}

		public function get globalHorizontal():Number
		{
			return _globalHorizontal;
		}

		public function set globalHorizontal(value:Number):void
		{
			_globalHorizontal = value;
		}
		
		public function toXML():XML
		{	
			var result:XML = new XML();
			
			result.name = this._label;
			result.country = this._countryId;
			result.gt = this._gt;
			result.ht = this._ht;
			result.globalNorth = this._globalNorth;
			result.globalSouth = this._globalSouth;
			result.globalEast = this._globalEast;
			result.globalWest = this._globalWest;
			result.globalHorizontal = this._globalHorizontal;
			
			return result;
			
		}
		
		public function requiredDataIsEntered():Boolean
		{
			if(this.label != "Please Choose")
				return true;
			return false;
		}


	}
	
}